package com.papers.juan.domain.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.papers.common.annotation.ExcelDictFormat;
import com.papers.common.convert.ExcelDictConvert;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 试卷导出bean
 *
 * @author libo
 * @date 2022/11/13 13:39
 */

@Data
@ColumnWidth(15)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public class PaperExportBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 试卷名称
     */
    @ExcelProperty({"试卷名称"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String paperName;

    /**
     * 试卷编码
     */
    @ExcelProperty({"试卷编码"})
    private String paperCode;

    /**
     * 试卷类型
     */
    @ExcelProperty(value = "试卷类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=人工组卷,2=自动组卷,3=人工导入")
    private String paperType;

    /**
     * 试卷描述
     */
    @ExcelProperty({"试卷描述"})
    private String paperDes;

    /**
     * 注意事项
     */
    @ExcelProperty({"注意事项"})
    private String paperAttention;

    /**
     * 是否有密封线
     */
//    @ExcelProperty(value = "是否有密封线", converter = ExcelDictConvert.class)
//    @ExcelDictFormat(readConverterExp = "0=否,1=是")
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
//    @ColumnWidth(18)
//    private String paperSealLine;

    /**
     * 难度系数
     */
    @ExcelProperty({"难度系数"})
    private BigDecimal paperEasy;

    /**
     * 总分
     */
    @ExcelProperty({"总分"})
    private Integer paperTotalScore;

    /**
     * 考试时长
     */
    @ExcelProperty({"考试时长"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private Integer paperTime;

    /**
     * 院系名称
     */
    @ExcelProperty({"院系"})
    private String departName;

    /**
     * 专业名称
     */
    @ExcelProperty({"专业"})
    private String majorName;

    /**
     * 课程名称
     */
    @ExcelProperty({"题库"})
    private String courseSubject;

//    /**
//     * 题库编码
//     */
////    @ExcelProperty({"题目列表", "题库编码"})
////    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
//    private String reposCode;
//
//    /**
//     * 课程编码
//     */
////    @ExcelProperty({"题目列表", "课程编码"})
////    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
//    private String courseCode;
//
//    /**
//     * 知识点编码
//     */
//    @ExcelProperty({"题目列表", "知识点编码"})
////    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
//    private String knowledgeCode;

    /**
     * 题目编码
     */
    @ExcelProperty({"题目列表", "题目编码"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String questionCode;

    /**
     * 知识点名称
     */
    @ExcelProperty({"题目列表", "知识点"})
    private String knowledgeName;

    /**
     * 题目类型
     */
    @ExcelProperty({"题目列表", "题目类型"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String questionType;

    /**
     * 难易程度
     */
    @ExcelProperty({"题目列表", "难易程度"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String questionEasy;

    /**
     * 难度系数
     */
    @ExcelProperty({"题目列表", "难度系数"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String questionDifficult;

    /**
     * 能力层次
     */
    @ExcelProperty({"题目列表", "能力层次"})
    private String capabilityLevel;

    /**
     * 分数
     */
    @ExcelProperty({"题目列表", "分数"})
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private Integer questionScore;

    /**
     * 选项内容JSON
     */
    @ColumnWidth(50)
    @ExcelProperty({"题目列表", "选项内容"})
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, verticalAlignment = VerticalAlignmentEnum.TOP, wrapped = BooleanEnum.TRUE)
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
    private String questionContent;

    /**
     * 答案
     */
    @ColumnWidth(50)
    @ExcelProperty({"题目列表", "答案"})
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, verticalAlignment = VerticalAlignmentEnum.TOP, wrapped = BooleanEnum.TRUE)
    private String answer;

}
